<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增举报信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-report-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">模块：</label>
                <div class="col-sm-8">
                    <input name="module" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">举报类型：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('report_type')}">
                        <input type="radio" th:id="${'reportType_' + dict.dictCode}" name="reportType" th:value="${dict.dictValue}" th:checked="${dict.default}">
                        <label th:for="${'reportType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">被举报目标id：</label>
                <div class="col-sm-8">
                    <input name="targetId" class="form-control" required type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">信息：</label>
                <div class="col-sm-8">
                    <textarea name="message" rows="5" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "forum/report"
        $("#form-report-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-report-add').serialize());
            }
        }
    </script>
</body>
</html>